<?
	
require_once 'ActiveRecord.php';

// No puede ser require_once porque necesito que actualice el valor de la db.
require(APP_PATH . 'config_db.php'); 

# must issue a "use" statement in your closure if passing variables
 ActiveRecord\Config::initialize(function($cfg) use ($connections, $current_db)
 {
   $cfg->set_model_directory(MODEL_PATH);
   $cfg->set_connections($connections);
   
   # default connection is now production
   $cfg->set_default_connection($current_db);
 });

?>
